package com.xbongbong.paas.manager;

import com.xbongbong.paas.pojo.dto.DepartmentRefreshDTO;
import com.xbongbong.paas.pojo.dto.DepartmentRefreshStatusDTO;
import com.xbongbong.paas.pojo.dto.DepartmentRefreshTimesDTO;
import com.xbongbong.paas.pojo.vo.DepartmentRefreshStatusVO;
import com.xbongbong.paas.pojo.vo.DepartmentRefreshTimesVO;
import com.xbongbong.paas.pojo.vo.DepartmentRefreshVO;
import com.xbongbong.paas.toolbox.exception.XbbException;

/**
 * 部门远程调用
 * @author kaka
 * @time 2018-9-5 15:43
 */
public interface DepartmentManager {

    /**
     * 同步组织架构，访问 dingtalk 项目相关接口完成逻辑
     * @param refreshDTO 关联DTO
     * @return 关联业务VO
     * @throws XbbException 业务异常
     */
    DepartmentRefreshVO refresh(DepartmentRefreshDTO refreshDTO) throws XbbException;

    /**
     * 获取当天同步组织架构剩余次数
     * @param refreshTimesDTO 关联DTO
     * @return 关联业务VO
     * @throws XbbException 业务异常
     */
    DepartmentRefreshTimesVO getFreshTimes(DepartmentRefreshTimesDTO refreshTimesDTO) throws XbbException;

    /**
     * 获取当前同步组织架构状态
     * @param refreshStatusDTO 关联DTO
     * @return 关联业务VO
     * @throws XbbException 业务异常
     */
    DepartmentRefreshStatusVO getFreshStatus(DepartmentRefreshStatusDTO refreshStatusDTO) throws XbbException;
}
